cmake_minimum_required(VERSION 3.16)
project("cppstd")

set(CMAKE_CXX_STANDARD 23)

if (EXISTS /usr/local/bin/gcc)
    set(CMAKE_C_COMPILER "/usr/local/bin/gcc")
    set(CMAKE_CXX_COMPILER "/usr/local/bin/g++")
elseif(EXISTS /usr/bin/gcc)
    set(CMAKE_C_COMPILER "/usr/bin/gcc")
    set(CMAKE_CXX_COMPILER "/usr/bin/g++")
else()
    message(STATUS "没有编译器可用")
    return()
endif ()

add_executable(std23 std_deducing.cpp std_deducing.cpp)